<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>员工信息管理系统 - 员工详情</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css">
</head>
<body>
<header>
    <div class="header-content">
        <h1>员工信息管理系统</h1>
        <div class="user-info">
            <span>欢迎您，${user.username}</span>
            <a href="${pageContext.request.contextPath}/logout" class="logout-btn">退出登录</a>
        </div>
    </div>
</header>

<nav>
    <ul>
        <li><a href="${pageContext.request.contextPath}/dashboard.jsp">首页</a></li>
        <li><a href="${pageContext.request.contextPath}/employee" class="active">员工管理</a></li>
    </ul>
</nav>

<main>
    <div class="content">
        <div class="content-header">
            <h2>员工详情</h2>
        </div>

        <!-- 员工详情信息 -->
        <div class="detail-container">
            <div class="detail-item">
                <label>ID:</label>
                <span>${employee.id}</span>
            </div>
            <div class="detail-item">
                <label>姓名:</label>
                <span>${employee.name}</span>
            </div>
            <div class="detail-item">
                <label>部门:</label>
                <span>${employee.department}</span>
            </div>
            <div class="detail-item">
                <label>职位:</label>
                <span>${employee.position}</span>
            </div>
            <div class="detail-item">
                <label>薪资:</label>
                <span><fmt:formatNumber value="${employee.salary}" type="number" pattern="###,###.00"/></span>
            </div>
            <div class="detail-item">
                <label>邮箱:</label>
                <span>${employee.email}</span>
            </div>
            <div class="detail-item">
                <label>电话:</label>
                <span>${employee.phone}</span>
            </div>
            <div class="detail-item">
                <label>入职日期:</label>
                <span><fmt:formatDate value="${employee.hireDate}" pattern="yyyy-MM-dd"/></span>
            </div>
            <div class="detail-actions">
                <a href="${pageContext.request.contextPath}/employee/edit?id=${employee.id}" class="btn-edit">编辑</a>
                <a href="${pageContext.request.contextPath}/employee" class="btn-back">返回列表</a>
            </div>
        </div>
    </div>
</main>
</body>
<script src="${pageContext.request.contextPath}/js/script.js"></script>
</html>